package mc.support.service.common;

import mc.support.support.pojo.Fragment;
import mc.support.taobao.api.*;
import mc.support.taobao.api.fields.*;
import com.taobao.api.ApiException;
import com.taobao.api.domain.*;
import com.taobao.api.response.*;

import java.util.List;
import java.util.Set;

/**
 * Created with IntelliJ IDEA. <br/>
 * User: francis    <br/>
 * Date: 13-11-20    <br/>
 * Time: 17:11  <br/>
 */
public interface ITaobaoTopAPIService {

    public List<Item> getOnSaleItems(String sessionKey, GetOnSaleItemFields fields);

    public List<Item> getOnSaleItems(String sessionKey, GetOnSaleItemReq req);

    public List<Item> getInventoryItems( String sessionKey, GetInventoryItemReq req, GetInventoryItemFields fields );

    public List<Item> getInventoryItems(String sessionKey, GetInventoryItemFields fields);

    public Fragment<Item> getOnSaleItemsLimit(String sessionKey, GetOnSaleItemFields fields,
                                              int begin, int offset);

    public Fragment<Item> getInventoryItemsLimit( String sessionKey, GetInventoryItemReq req, GetInventoryItemFields fields,
                                               int begin, int offset );

    public Fragment<Item> getInventoryItemsLimit(String sessionKey, GetInventoryItemFields fields,
                                            int begin, int offset);

    public Long getOnSaleItemCount(String sessionKey);

    public List<Item> getItems(String sessionKey, String nick, GetItemsFields fields);

    public List<Item> getItemsByCat(String sessionKey, Long cid, GetItemsFields fields, Integer limit);

    public Fragment<Item> getItemsLimit(String sessionKey, String nick, GetItemsFields fields,
                                    int begin, int offset);

    public Item getItem(String sessionKey, Long itemId, GetItemInfoFields fields);

    public List<Item> searchItems(String sessionKey, String query, GetItemsFields fields,
                                  int begin, int offset);

    public List<Item> searchItemsByPop(String sessionKey, GetItemsFields fields,long cid,
                                       String order, String props,int limit);

    public List<Item> getItemsList(String sessionKey, Set<Long> itemIds, GetItemsListFields fields);

    public List<SellerCat> getSellerCats(String sessionKey, String nick);

    public ItemUpdateResponse updateItem(UpdateItemReq req);

    public ItemUpdateResponse updateItemNoExcepHandle(UpdateItemReq req) throws ApiException;

    public Shop getShopInfo(String sessionKey, String nick, GetShopInfoFields fields);

    public List<ArticleUserSubscribe>  getArticleUserSubscribe(GetVasSubscribeReq req);

    /**
	 * corresponding to "taobao.user.seller.get"获取卖家信息
	 *
	 * @param sessionKey
	 * @param req
	 * @return
	 */
    public User getSeller(String sessionKey, GetSellerReq req);

    /**
	 * luohui 获取剩下橱窗数量
	 *
	 * @param sessionKey
	 * @return
	 */
    public ShopRemainshowcaseGetResponse getShopRemainshowcase(String sessionKey) throws ApiException;

	/**
	 * luohui 推荐一个宝贝到橱窗
	 *
	 * @param itemId
	 */
    public ItemRecommendAddResponse itemRecommendAdd(Long itemId,String sessionKey) throws ApiException;

	/**
	 * luohui 取消推荐一个宝贝到橱窗
	 *
	 * @param itemId
	 */
    public ItemRecommendDeleteResponse itemRecommendDelete(Long itemId,String sessionKey) throws ApiException;

    public List<ItemCat> getItemCats(String sessionKey, GetItemCatsReq req);

    public ClouddataMbpDataGetResponse mbpDataGet(GetCloudDataReq req);

	/**
	 * @author kane 通过cid取得品牌信息
	 */
	public ItempropsGetResponse getBrandInfoByCid(Long cid,
			GetBrandInfoFields fields);

    /**
	 * taobao.jushita.jdp.user.add 添加数据推送用户
	 * */
    public Boolean addJushitaJdpUser(String sessionKey, String rdsName);

    /**
     * taobao.clouddata.mbp.data.flowback
     * */
    public ClouddataMbpDataFlowbackResponse mbpDataFlowback(String sessionKey, String tableName, String data);

	/**
	 * @author kane 为已授权的用户开通消息服务
	 */
	public boolean permitUserOnMsg(String sessionKey);

	/**
	 * @author kane 为已授权的用户分配分组
	 */
	public boolean msgGroupAdd(String nick, String groupname);

    /**
     * taobao.vas.order.search
     * @param request
     * @return
     */
    public VasOrderSearchResponse vasOrderSearch(VasOrderSearchReq request);

    /**
     * taobao.clouddata.mbp.status.get
     * @param request
     * @return
     */
    public ClouddataMbpStatusGetResponse mbpStatusGet(GetCloudDataStatusReq request);

    public List<ItemProp> getItemProps(GetItemPropsReq req);

    /**
     * taobao.fuwu.sale.link.gen 服务平台营销链接生成接口
     * @param request
     * @return 生成的营销链接
     */
    public String generateSaleLink(GenerateSaleLinkReq request);

    /**
     * corresponding to "taobao.users.get"
     */
    public List<User> getUsers(GetUsersReq req);

    /**
     * corresponding to "taobao.delivery.templates.get"
     */
    public List<DeliveryTemplate> getDeliveryTemplates(String sessionKey,GetDeliveryTemplatesReq req);
    /**
     * corresponding to "taobao.item.update.delisting"
     */
    public ItemUpdateDelistingResponse updateItemDelisting(UpdateDelistingReq req) throws ApiException;
    /**
     * corresponding to "taobao.item.update.listing"
     */
    public ItemUpdateListingResponse updateItemListing(UpdateListingReq req) throws ApiException;
    /**
     * corresponding to "taobao.item.sku.update"
     */
    public ItemSkuUpdateResponse updateItemSku(UpdateItemSkuReq req) throws ApiException;
    /**
     * corresponding to "taobao.item.delete "
     */
    public ItemDeleteResponse deleteItem(DeleteItemReq req) throws ApiException;
    /**
     * corresponding to "taobao.item.process.warns.search"
     */
    public List<Warn> getItemProcessWarns(String sessionKey,GetItemProcessWarnsReq req);
    /**
     * corresponding to "taobao.item.process.punishes.search"
     */
    public List<Punish> getItemProcessPunishes(String sessionKey,GetItemProcessPunishesReq req);
    /**
     * corresponding to "taobao.item.process.shields.search"
     */
    public List<Shield> getItemProcessShields(String sessionKey,GetItemProcessShieldsReq req);
    /**
     * corresponding to "taobao.item.process.advises.search"
     */
    public List<Advise> getItemProcessAdvises(String sessionKey,GetItemProcessAdvisesReq req);

}
